package com.springboot.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.springboot.entity.BlogArticleEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.springboot.returndata.dto.blog.BlogArticlePageDto;
import com.springboot.returndata.vo.blog.BlogArticleInfoVo;
import com.springboot.returndata.vo.blog.BlogArticleVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 博客文章内容表 Mapper 接口
 * </p>
 *
 * @author zyj
 * @since 2023-03-23
 */
@Mapper
public interface BlogArticleDao extends BaseMapper<BlogArticleEntity> {

    Page<BlogArticleVo> pageBlogArticle(Page<BlogArticleVo> page, @Param("blogArticlePageDto") BlogArticlePageDto blogArticlePageDto);

    BlogArticleInfoVo findBlogArticleById(@Param("id") Integer id);

    void updateEyeUp(@Param("id") Integer id);

    void updateStatus(@Param("id") Integer id, @Param("articleStatus") String articleStatus);

}
